home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / Replacements / cpdist_0_17.lha / cpdist-0.17 / source / MAKEFILE.TC < prev    next >
Text File  |  1994-06-03  |  5KB  |  136 lines

  1. # CPDIST Makefile for Turbo C Version 1.0, MS-DOS
  2. # This one is needed to run CPDIST under versions of MS-DOS <= V2.3
  3. #
  4. # (c)Copyright 1992-93 by Tobias Ferber.
  5. #
  6. # This file is part of CPDIST.
  7. #
  8. # CPDIST is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published
  10. # by the Free Software Foundation; either version 1 of the License,
  11. # or (at your option) any later version.
  12. #
  13. # CPDIST is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with CPDIST; see the file COPYING.  If not, write to
  20. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22. TC_PATH= c:\devel\tc
  23. TC_BIN_PATH= $(TC_PATH)\bin
  24. TC_LIB_PATH= $(TC_PATH)\libs
  25. TC_INCLUDE_PATH= $(TC_PATH)\include
  26.  
  27. CC= $(TC_BIN_PATH)\tcc.exe
  28. LN= $(TC_BIN_PATH)\tlink.exe
  29.  
  30. # The memory model can be (s)mall, (m)edium, (c)ompact, (l)arge or (h)uge
  31.  
  32. MODEL= c
  33.  
  34. # CFLAGS should be taken from those:
  35. #
  36. # Turbo C  Version 1.0  Copyright (c) 1987 Borland International
  37. # Syntax is: TCC [ options ] file[s]     * = default; -x- = turn switch x off
  38. #   -1      80186/286 Instructions    -A      Disable non-ANSI extensions
  39. #   -B      Compile via assembly      -C      Allow nested comments
  40. #   -Dxxx   Define macro              -G      Generate for speed
  41. #   -Ixxx   Include files directory   -K      Default char is unsigned
  42. #   -Lxxx   Libraries directory       -M      Generate link map
  43. #   -N      Check stack overflow      -O      Optimize jumps
  44. #   -S      Produce assembly output   -Uxxx   Undefine macro
  45. #   -Z      Optimize register usage   -a      Generate word alignment
  46. #   -c      Compile only              -d      Merge duplicate strings
  47. #   -exxx   Executable file name      -f    * Floating point emulator
  48. #   -f87    8087 floating point       -f-     No floating point
  49. #   -gnnn   Stop after N warnings     -innn   Maximum identifier length N
  50. #   -jnnn   Stop after N errors       -k      Standard stack frame
  51. #   -mc     Compact model             -mh     Huge Model
  52. #   -ml     Large Model               -mm     Medium Model
  53. #   -ms   * Small Model               -mt     Tiny Model
  54. #   -nxxx   Output file directory     -oxxx   Object file name
  55. #   -p      Pascal calls              -r    * Register variables
  56. #   -u    * Underscores on externs    -w      Enable all warnings
  57. #   -wxxx   Enable warning xxx        -w-xxx  Disable warning xxx
  58. #   -y      Produce line number info  -zxxx   Set segment names
  59.  
  60. CFLAGS=\
  61.     -I$(TC_INCLUDE_PATH)\
  62.     -L$(TC_LIB_PATH)\
  63.     $(DEFINES)\
  64.     -N -O -G -Z -f- -d -A -m$(MODEL) -a -y -k -w-pia
  65.  
  66. # LFLAGS should be taken from those:
  67. #
  68. # /m = map file with publics
  69. # /x = no map file at all
  70. # /i = initialize all segments
  71. # /l = include source line numbers
  72. # /s = detailed map of segments
  73. # /n = no default libraries
  74. # /d = warn if duplicate symbols in libraries
  75. # /c = lower case significant in symbols
  76.  
  77. LFLAGS= /x/l/d/c
  78.  
  79. OBJS= $(TC_LIB_PATH)\c0$(MODEL).obj
  80. LIBS= $(TC_LIB_PATH)\c$(MODEL).lib
  81.  
  82. # Linking CPDIST in the usual way didn't work because the command line
  83. # became too long for turbo make...
  84. # However a so called 'response file' can be specified in the command
  85. # line for TLINK.EXE via an @xxxx option with 'xxxx' being the response
  86. # file. Since command line redirectioning was not supported by MAKE.EXE
  87. # either I wrote 'MKLNK.EXE' which appends it's arguments to a file
  88. # called 'TURBOC.$LN'. (This name is also used by TCC.EXE).
  89. # MKLNK.C should be part of this distribution.
  90.  
  91. MKLNK= $(TC_BIN_PATH)\mklnk.exe
  92. LINKFILE= turboc.$ln
  93.  
  94. # *** / LET's ROLL / ***
  95.  
  96. all: cpdist
  97.  
  98. cpdist: cpdist.exe
  99.  
  100. CPDIST_OBJS=\
  101.     main.obj args.obj msg.obj cpdist.obj keys.obj getkey.obj filecopy.obj
  102.  
  103. cpdist.exe: $(CPDIST_OBJS) $(LINKFILE)
  104.     $(LN) @$(LINKFILE)
  105.  
  106. # The response file has to be remade if we (makefile.TC) have been modified
  107.  
  108. $(LINKFILE): makefile.TC
  109.     $(MKLNK)
  110.     $(MKLNK) $(OBJS) +
  111.     $(MKLNK) $(CPDIST_OBJS)
  112.     $(MKLNK) cpdist.exe
  113.     $(MKLNK) $(LFLAGS)
  114.     $(MKLNK) $(LIBS)
  115.  
  116. main.obj: main.c cpdist.h
  117.     $(CC) $(CFLAGS) -c -omain.obj main.c
  118.  
  119. args.obj: args.c
  120.     $(CC) $(CFLAGS) -c -oargs.obj args.c
  121.  
  122. msg.obj: msg.c cpdist.h
  123.     $(CC) $(CFLAGS) -c -omsg.obj msg.c
  124.  
  125. cpdist.obj: cpdist.c cpdist.h
  126.     $(CC) $(CFLAGS) -c -ocpdist.obj cpdist.c
  127.  
  128. keys.obj: keys.c cpdist.h
  129.     $(CC) $(CFLAGS) -c -okeys.obj keys.c
  130.  
  131. getkey.obj: getkey.c getkey.h
  132.     $(CC) $(CFLAGS) -c -ogetkey.obj getkey.c
  133.  
  134. filecopy.obj: filecopy.c filecopy.h
  135.     $(CC) $(CFLAGS) -c -ofilecopy.obj filecopy.c
  136.